Resource sharing method and terminal

ABSTRACT

A resource sharing method is performed at a mobile terminal, the method including: receiving a resource sharing message configuration file that is delivered in a pre-configured delivery time period; obtaining a theme activity time period according to the resource sharing message configuration file; displaying a resource sharing message configuration portal in the theme activity time period; detecting an operation on the resource sharing message configuration portal, and entering a resource sharing message configuration page; obtaining, according to a configuration performed on the resource sharing message configuration page, a resource sharing message template matching the theme activity time period and resource information matching the resource sharing message template; generating a resource sharing message according to the obtained resource sharing message template and resource information, the resource sharing message including data for obtaining a resource; and sharing the resource sharing message.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/041,581, entitled “RESOURCE SHARING METHOD AND TERMINAL” filed onJul. 20, 2018, which is a continuation-in-part application of (i)PCT/CN2017/070630, entitled “RESOURCE SHARING METHOD AND TERMINAL” filedon Jan. 9, 2017, which claims priority to Chinese Patent Application No.201610042104.8, filed with the State Intellectual Property Office of thePeople's Republic of China on Jan. 21, 2016, and entitled “RESOURCESHARING METHOD AND TERMINAL”, (ii) PCT/CN2017/071595, entitled “RESOURCESHARING METHOD, TERMINAL, AND STORAGE MEDIUM” filed on Jan. 18, 2017,which claims priority to Chinese Patent Application No. 201610042161.6,filed with the State Intellectual Property Office of the People'sRepublic of China on Jan. 21, 2016, and entitled “RESOURCE SHARINGMETHOD, TERMINAL, AND STORAGE MEDIUM”, and (iii) PCT/CN2017/071557,entitled “RESOURCE SHARING METHOD, RESOURCE OBTAINING METHOD, TERMINAL,AND SERVER” filed on Jan. 18, 2017, which claims priority to ChinesePatent Application No. 201610059620.1, filed with the State IntellectualProperty Office of the People's Republic of China on Jan. 28, 2016, andentitled “RESOURCE SHARING METHOD, RESOURCE OBTAINING METHOD, TERMINAL,AND SERVER”, all of which are incorporated herein by reference in theirentirety.

FIELD OF THE TECHNOLOGY

The present disclosure relates to the field of network technologies, andin particular, to a resource sharing method and a terminal.

BACKGROUND OF THE DISCLOSURE

With the development of network technologies, more users are engaged insocial networking activities by using a network. The users usually shareresources by using an instant messaging application or a socialnetworking application, especially for publishing a resource message byusing an instant messaging application or a social networkingapplication to implement sharing of resources. The resources include butare not limited to virtual red packets, electronic coupons, pointcoupons, points, electronic vouchers, game currency, and virtualobjects. After the resources are shared on the instant messagingapplication or the social networking application, users of the instantmessaging application or the social networking application may requestto share the resources.

During conventional resource sharing, the resource message body sent bythe resource sharing initiator can carry only word information, andtypes of information carried during resource sharing are extremelylimited.

SUMMARY

According to various embodiments of this application, a resource sharingmethod and a terminal are provided.

According to a first aspect of the present disclosure, a resourcesharing method performed at a mobile terminal having one or moreprocessors and memory storing a plurality of programs to be executed bythe one or more processors, the method comprising, comprising:

obtaining configured user identifier;

obtaining multimedia data;

obtaining a resource sharing request, and associating the useridentifier with the multimedia data according to the resource sharingrequest;

generating a resource sharing instruction according to an associationrelationship between the user identifier and the multimedia data; and

executing the resource sharing instruction.

According to a second aspect of the present disclosure, a mobileterminal for media information releasing includes one or moreprocessors, memory coupled to the one or more processors, and aplurality of programs stored in the memory that, when executed by theone or more processors, cause the mobile terminal to perform theaforementioned resource sharing method.

According to a third aspect of the present disclosure, a non-transitorycomputer readable storage medium stores a plurality of programs that,when executed by one or more processors of a mobile terminal, cause themobile terminal to perform the aforementioned resource sharing method.

Details of one or more embodiments of the present disclosure areprovided in the following accompanying drawings and descriptions. Otherfeatures, objectives, and advantages of the present disclosure areobvious in this specification, the accompanying drawings, and theclaims.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure or in the existing technologies more clearly, the followingbriefly describes the accompanying drawings required for describing theembodiments or the existing technologies. Apparently, the accompanyingdrawings in the following description show merely some embodiments ofthe present disclosure, and a person of ordinary skill in the art maystill derive other drawings from these accompanying drawings withoutcreative efforts.

FIG. 1 is a schematic diagram of an application environment of aresource sharing method according to some embodiments of the presentdisclosure;

FIG. 2 is a schematic diagram of an internal structure of a terminalaccording to some embodiments of the present disclosure;

FIG. 3 is a flowchart of a resource sharing method according to someembodiments of the present disclosure;

FIG. 4 is a schematic diagram of prompting to enable permission to sharea personalized resource;

FIG. 5 is a schematic diagram of a video data role selection interface;

FIG. 6 is a schematic diagram of a generated resource message accordingto some embodiments of the present disclosure;

FIG. 7 is a flowchart of a resource sharing method according to someembodiments of the present disclosure;

FIG. 8 is a flowchart of a resource sharing method according to anotherembodiment;

FIG. 9 is a schematic diagram of selecting a star character on a videodata selection interface according to some embodiments of the presentdisclosure;

FIG. 10 is a schematic diagram of sending a red packet on a two-personsession interface according to some embodiments of the presentdisclosure;

FIG. 11 is a schematic diagram of accepting a red packet according tosome embodiments of the present disclosure;

FIG. 12 is a schematic diagram of sending a red packet on a groupsession interface according to some embodiments of the presentdisclosure;

FIG. 13 is a schematic diagram of accepting a red packet on a groupsession interface according to some embodiments of the presentdisclosure;

FIG. 14 is a schematic flowchart of a resource sharing method accordingto some embodiments of the present disclosure;

FIG. 15 is a schematic flowchart of steps of self-configuring a resourcesharing message image template according to some embodiments of thepresent disclosure;

FIG. 16 is a schematic flowchart of steps of obtaining a resourceaccording to some embodiments of the present disclosure;

FIG. 17 is a schematic flowchart of a resource sharing method accordingto another embodiment;

FIG. 18 is a schematic diagram 1 of a session page according to someembodiments of the present disclosure;

FIG. 19 is a schematic diagram 1 of a red packet image configurationpage according to some embodiments of the present disclosure;

FIG. 20 is a schematic diagram 2 of a red packet image configurationpage according to some embodiments of the present disclosure;

FIG. 21 is a schematic diagram 3 of a red packet image configurationpage according to some embodiments of the present disclosure;

FIG. 22 is a schematic diagram 4 of a red packet image configurationpage according to some embodiments of the present disclosure;

FIG. 23 is a schematic diagram 2 of a session page according to someembodiments of the present disclosure;

FIG. 24 is a schematic diagram 3 of a session page according to someembodiments of the present disclosure;

FIG. 25 is a schematic diagram 4 of a session page according to someembodiments of the present disclosure;

FIG. 26 is a schematic flowchart of a resource sharing method accordingto some embodiments of the present disclosure;

FIG. 27 is a schematic diagram of a session page according to someembodiments of the present disclosure;

FIG. 28 shows a resource sharing message configuration page 1 accordingto some embodiments of the present disclosure;

FIG. 29 shows a resource sharing message configuration page 2 accordingto some embodiments of the present disclosure;

FIG. 30 shows a resource sharing message configuration page 3 accordingto some embodiments of the present disclosure;

FIG. 31 shows a resource sharing message configuration page 4 accordingto some embodiments of the present disclosure;

FIG. 32 shows obtaining, according to a configuration performed on theresource sharing message configuration page, a resource sharing messagetemplate matching the theme activity time period and resourceinformation matching the resource sharing message template, according tosome embodiments of the present disclosure;

FIG. 33 is a schematic flowchart of steps of obtaining a resource shareby means of payment according to some embodiments of the presentdisclosure;

FIG. 34 is a schematic diagram of a payment page according to someembodiments of the present disclosure;

FIG. 35 is a schematic flowchart of steps of obtaining a resourceaccording to some embodiments of the present disclosure;

FIG. 36 is a schematic diagram of displaying a resource sharing messageimage on a session page according to some embodiments of the presentdisclosure;

FIG. 37 is a schematic diagram of displaying a resource obtaining resulton a result display page according to some embodiments of the presentdisclosure;

FIG. 38 is a schematic flowchart of a resource sharing method accordingto another embodiment; and

FIG. 39 is a schematic flowchart of a resource obtaining methodaccording to an embodiment.

FIG. 40 is a structural block diagram of a resource sharing apparatusaccording to some embodiments of the present disclosure;

FIG. 41 is a structural block diagram of a resource sharing apparatusaccording to another embodiment;

FIG. 42 is a structural block diagram of a resource sharing apparatusaccording to another embodiment; and

FIG. 43 is a structural block diagram of a resource sharing apparatusaccording to another embodiment.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of thepresent disclosure clearer and more comprehensible, the followingfurther describes the present disclosure in detail with reference to theaccompanying drawings and embodiments. It should be understood that thespecific embodiments described herein are merely used to explain thepresent disclosure but are not intended to limit the present disclosure.

It may be understood that terms “first”, “second” and the like used inthe present disclosure may be used to describe various elements in thisspecification, but the elements are not limited by the terms. The termsare merely used to distinguish a first element from another element. Forexample, in a case not departing from the scope of the presentdisclosure, a first client may be referred to as a second client, andsimilarly, a second client may be referred to as a first client. Boththe first client and the second client are clients, but are not a sameclient.

FIG. 1 is a schematic diagram of an application environment of aresource sharing method according to an embodiment. As shown in FIG. 1,the application environment includes a first terminal 110, a server 120,and a second terminal 130. The first terminal 110 and the secondterminal 130 communicate with the server 120 by using a network. Thefirst user logs in to an application program client on the firstterminal 110 to initiate a resource sharing request, obtains, accordingto the resource sharing request, user identifier and multimedia datathat is recorded or selected by a user, generates a resource messageincluding the user identifier and the multimedia data, sends, by usingthe server 120, the resource message to a friend of the first user, thatis, a second user on the second terminal 130 or to a group that thefirst user is in, and displays the resource message in the group. Afterthe second user on the second terminal 130 or a member in the groupreceives the resource message, the second user or the member triggersthe resource message, plays the multimedia data in the resource message,and receives a resource in the resource message. The resource message isa message including the user identifier. The user identifier may includethe resource and an identifier of a resource sharing initiator, and mayfurther include information content shared by the resource sharinginitiator, a time and a validity period of resource sharing, and thelike. The multimedia data may be multimedia data that is recorded inreal time or selected locally or from a network by the resource sharinginitiator. The multimedia data may be one or two of audio data and videodata.

In addition, the server 120 may generate the resource message includingthe user identifier and the multimedia data.

FIG. 2 is a schematic diagram of an internal structure of a terminalaccording to an embodiment. As shown in FIG. 2, the terminal includes aprocessor, a storage medium, a memory and a network interface that areconnected by using a system bus, a voice acquisition apparatus, adisplay, a speaker, and an input apparatus. The storage medium of theterminal stores an operating system, and further includes a resourcesharing apparatus. The resource sharing apparatus is configured toperform a resource sharing method. The processor is configured toprovide computing and controlling capabilities, to support operating ofthe entire terminal. The memory in the terminal provides an environmentfor operating of the resource sharing apparatus in the storage medium.The network interface is configured to perform network communicationwith a server, such as send a resource sharing request to the server,and receive information that is returned by the server and thatindicates that a resource receiver successfully receives the resourcesharing request. The display of the terminal may be a liquid crystaldisplay, an E-ink display, or the like. The input apparatus may be atouch layer covered on the display, or may be a button, a track ball, ora touch pad disposed on an external housing of the terminal, or may bean externally connected keyboard, a touch pad, a mouse or the like. Theterminal may be a mobile phone, a tablet computer, a personal digitalassistant, or a wearable device. A person skilled in the art mayunderstand that FIG. 2 is merely one of structural block diagramsrelated to the solution of this application, and does not constitute alimit to the terminal to which the solution of this application isapplied. Specifically, the terminal may include more or less componentsthan those shown in the figure, or combine some components, or havedifferent component deployments.

FIG. 3 is a flowchart of a resource sharing method according to anembodiment. As shown in FIG. 3, a resource sharing method is describedfrom the perspective of resource sharing initiation and run on a firstterminal 110, and includes the following steps:

Step 302: Obtain configured user identifier.

Specifically, the user identifier may include a resource and anidentifier of a user, and may further include information content sharedby a resource sharing initiator, a time and validity period of resourcesharing, and the like. The resource may be money, an electronic voucher,points, game currency, a physical object coin certificate, and the like.The identifier of the user is an identifier that uniquely identifies auser identity, and may be an instant messaging account, a mobile phonenumber, a social networking application account of the resource sharinginitiator.

After the user logs in to an instant messaging application or to asocial networking application and enters a resource sharing interface,the user identifier configured by the user is obtained.

Step 304: Obtain multimedia data.

In this embodiment, the multimedia data may include a multimedia file,or include a multimedia file and a multimedia identifier. The multimediafile may include one or two of an audio file or a video file.

The audio data may be a voice recorded by the resource sharinginitiator, music selected by the resource sharing initiator, or audiodata downloaded from a network by the resource sharing initiator. Theaudio data downloaded from the network may be audio data of differentvoices such as a female voice, a male voice, a child's voice, or acartoon character's voice.

The video data may be a personalized video recorded by the resourcesharing initiator, a video made by the resource sharing initiator, or avideo downloaded from a network by the resource sharing initiator. Arole in the video may use a cartoon character, a game role, a starcharacter, or the user himself. A pre-determined time may be set in therecorded voice or video. This effectively limits the size of the voiceor video data and can limit the size of occupied space.

The step of obtaining multimedia data includes: obtaining a real-timerecorded multimedia file or a multimedia file selected locally or from aserver.

Specifically, in the real-time recorded multimedia file, a recorded timemay be limited.

Step 306: Obtain a resource sharing request, and associate the useridentifier with the multimedia data according to the resource sharingrequest.

In this embodiment, the user identifier is associated with themultimedia data, that is, a correspondence is established between theuser identifier and the multimedia data.

Step 308: Generate a resource sharing instruction according to anassociation relationship between the user identifier and the multimediadata.

In this embodiment, the resource sharing instruction is generatedaccording to the association relationship between the user identifierand the multimedia data, and a control of “Send to share” or a controlof “Determine to share” may be displayed on the terminal.

Step 310: Execute the resource sharing instruction.

Specifically, the control of “Send to share” or the control of“Determine to share” displayed on the terminal may be tapped to confirm.After the execution of the resource sharing instruction by the user isobtained, a resource message including the user identifier and themultimedia data may be generated according to the executed resourcesharing instruction, or the user identifier and the multimedia data maybe uploaded to the server according to the executed resource sharinginstruction. The server generates, according to the user identifier andthe multimedia data, the resource message including the user identifierand the multimedia data.

According to the resource sharing method, the multimedia data and theconfigured user identifier are obtained, the user identifier isassociated with the multimedia data according to the resource sharingrequest, the resource sharing instruction is generated according to theassociation relationship between the user identifier and the multimediadata, and the resource sharing instruction is executed, so that themultimedia data can be carried during resource sharing, and types ofinformation carried during resource sharing are expanded.

In an embodiment, the resource sharing method further includes:generating a resource message including the user identifier and themultimedia data; and sending the resource message including themultimedia data.

In this embodiment, the terminal or the server may generate, accordingto the user identifier and the multimedia data, the resource messageincluding the user identifier and the multimedia data. The terminal orthe server sends, to another user, the resource message including theuser identifier and the multimedia data. The resource message may besent to one person or a group. When the resource message is sent to agroup, the user identifier in the resource message may further includethe quantity of divided resources and allocation manners. The quantity,such as five or ten, may be set by a resource sharing initiator. Theallocation manner may be: evenly distributing resources according to thequantity or randomly distributing resources according to the quantity.

In addition, the multimedia data selected from the generated resourcemessage may be uploaded to the server as a template, to facilitate useof other users. Alternatively, the selected multimedia data and theidentifier of the user may be uploaded to the server, and a mappingrelationship between the multimedia data and the identifier of the usermay be established, to facilitate subsequent selection and use of theuser himself.

In an embodiment, the resource sharing method further includes: afterthe obtaining a resource sharing request, obtaining an identifier of auser that initializes the resource sharing request, determining whetherthe identifier of the user has permission to share a personalizedresource, and if the identifier of the user has the permission,obtaining the multimedia data according to the resource sharing request,or if the identifier of the user does not have the permission, promptingthe user to enable the permission to share the personalized resource.

FIG. 4 is a schematic diagram of prompting to enable permission to sharea personalized resource. As shown in FIG. 4, that an instant messagingapplication member has permission to share a personalized resource isprompted on a personalized resource permission enabling interface, andthe user is prompted to enable an instant messaging applicationmembership.

FIG. 5 is a schematic diagram of a video data role selection interface.As shown in FIG. 5, after a user enables an instant messagingapplication membership, many different roles are provided on the videodata role selection interface for selection. For example, a firstpicture is a cartoon role. The cartoon role may be used as a role ofmultimedia data in a resource message, the cartoon role may be displayedon the surface of the resource message, and descriptions in words, suchas “I am rich I am willful”, may further be attached. A second pictureis a star character. The star character may be used as a role of themultimedia data in the resource message, and the star character isdisplayed on the surface of the resource message. A third picture is agame role. The game role may be used as a role of the multimedia data inthe resource message, and the game role is displayed on the surface ofthe resource message.

In an embodiment, the step of obtaining multimedia data in the resourcesharing method includes: obtaining an identifier of a user and areal-time recorded multimedia file, and uploading the identifier of theuser and the multimedia file to a server; and obtaining a multimediaidentifier allocated by the server to the multimedia file.

In this embodiment, the server allocates the multimedia identifier tothe multimedia data, and establishes an association relationship betweenthe multimedia identifier and the identifier of the user.

The identifier of the user is an identifier that uniquely identifies auser identity, and may be an instant messaging account, a mobile phonenumber, a social networking application account of the resource sharinginitiator. The multimedia identifier is an identifier that uniquelyidentifies the multimedia data.

An association relationship between the multimedia identifier and theidentifier of the user is established, that is, a mapping relationshipis established.

Further, when the multimedia identifier allocated by the server to themultimedia data is obtained, a resource sharing instruction is generatedaccording to the association relationship between the user identifierand the multimedia identifier, and after the resource sharinginstruction is executed, the user identifier and the multimediaidentifier are uploaded to the server. The server finds thecorresponding multimedia file according to the multimedia identifier,and generates, according to the user identifier and the multimedia file,the resource message including the user identifier and the multimediadata.

In an embodiment, the resource sharing method further includes:displaying a resource message generated after the step of executing theresource sharing instruction, providing a transparent layer on aresource message body of the resource message, and displaying themultimedia data at the transparent layer.

Specifically, the resource message body is a message structure of theresource message.

In an embodiment, the resource sharing method further includes: afterthe step of displaying the multimedia data at the transparent layer,displaying, at the transparent layer, a multimedia control configured tocontrol playback of the multimedia data.

Specifically, the multimedia control may include a play/pause key. Inaddition, the multimedia control may further include one or more of amute key, a voice key, a forward key, and a backward key.

FIG. 6 is a schematic diagram of a generated resource message accordingto an embodiment. As shown in FIG. 6, a role image of multimedia data isconfigured and a play/pause key is provided on the surface of theresource message.

In an embodiment, the resource sharing method further includes:including a validity period in the generated resource message.

FIG. 7 is a flowchart of a resource sharing method according to anembodiment. As shown in FIG. 7, the resource sharing method is describedfrom the perspective of a resource receiving end, and includes thefollowing steps:

Step 702: Receive a resource message.

Step 704: Display the resource message.

Step 706: Obtain a trigger operation on the resource message.

In this embodiment, the trigger operation on the resource message may betapping the resource message.

After step 706, the resource sharing method further includes: obtainingan identifier of a resource receiver, determining whether the identifierof the resource receiver has permission to receive a resource in theresource message, and if the identifier of the resource receiver haspermission to receive the resource in the resource message, allowing theresource receiver to receive the resource in the resource message, or ifthe identifier of the resource receiver does not have permission toreceive the resource in the resource message, prohibiting the resourcereceiver to receive the resource in the resource message.

Step 708: Play multimedia data in the resource message according to thetrigger operation, and receive a resource in the resource message.

According to the resource sharing method, the trigger operation isperformed on the received and displayed resource message, the multimediadata in the resource message is played, and the resource in the resourcemessage is received, so that the resource message carries the multimediadata, and types of information carried during resource sharing areexpanded.

In an embodiment, a multimedia control is configured on the surface ofthe resource message; and the resource sharing method further includes:obtaining a trigger operation on the multimedia control to generate acorresponding control instruction; and playing the multimedia dataaccording to the control instruction.

The multimedia control may include a play/pause key, a voice key, a mutekey, and the like. Different control instructions are generated fordifferent key trigger operations, and the multimedia data is playedaccording to the control instructions. For example, if the mute key istriggered, a mute instruction is generated, and the multimedia data isplayed in a mute play mode.

In an embodiment, the resource sharing method further includes: afterthe obtaining a trigger operation on the resource message, determiningwhether the resource in the resource message is overdue; and if yes,receiving prompt information indicating that the resource is overdue, orif not, receiving the resource in the resource message.

In an embodiment, the resource sharing method further includes: afterthe obtaining a trigger operation on the resource message, determiningwhether the resource in the resource message is fully accepted, and ifyes, receiving prompt information indicating that the resource is fullyaccepted, or if not, receiving a resource that is evenly allocatedaccording to the quantity, or receiving a resource that is randomlyallocated from a remaining resource.

FIG. 8 is a flowchart of a resource sharing method according to anotherembodiment. As shown in FIG. 8, in an embodiment, a transparent layer isprovided on a resource message body of a resource message, andmultimedia data and a multimedia control that is configured to controlplayback of the multimedia data are displayed at the transparent layer.

A resource sharing method includes the following steps:

Step 802: Receive a resource message on a chat interface.

In this embodiment, the chat interface may be a chat interface of atwo-person session or a chat interface of a group session.

Step 804: Automatically play multimedia data in the resource message.

In this embodiment, playback may end after the multimedia data in theresource message is automatically played once.

According to the resource sharing method, after the resource message isreceived on the chat interface, the multimedia data in the resourcemessage is automatically played and does not need a trigger operation bya receiver, so that an operation is simplified.

An implementation process of the resource sharing method is describedbelow with reference to a specific application scenario. For example,the resource message is a red packet, the resource is the amount ofmoney in the red packet, and the session is a two-person session. Theresource sharing method includes the following steps:

(1) A first terminal obtains a red packet sending request initiated by afirst user, enters a video data selection interface according to the redpacket sending request, obtains a star character selected by the firstuser on the video data selection interface as video data of a video datarole.

As shown in FIG. 9, the star character is selected on the video dataselection interface as the video data of the video data role.

(2) The first terminal generates a red packet according to the selectedvideo data, an identifier of the first user, and the amount of money,provides a transparent layer on a message body of the red packet,displays the star character of the video data at the transparent layer,and provides a play/pause key at the transparent layer of the messagebody of the red packet.

(3) The first terminal sends, to a second user by using an instantmessaging session window, the red packet that is sent by the first userto the second user.

As shown in FIG. 10, the red packet is sent on the two-person sessioninterface, and the star character of the video data and the play/pausekey are displayed at the transparent layer on the message body of thered packet.

(4) After the second user receives the red packet on the chat interfaceby using a second terminal, the second user plays the video data in thered packet, accepts the amount of money, and displays the alias of thefirst user and description in words.

As shown in FIG. 11, after the second user receives the red packet onthe two-person session interface, the second user taps the red packet,and accepts 8.2 yuan. Tom is displayed as the first user, thedescription in words of “Never say never” is displayed, and a controlfor “View details of acceptance” is provided.

The accepted red packet and a corresponding amount of money may beviewed.

For example, the resource message is a red packet, the resource is theamount of money in the red packet, and the session is a group session.The resource sharing method includes the following steps:

(1) A first terminal obtains a red packet sending request initiated by afirst user to a group A that the first user is in, enters a video dataselection interface according to the red packet sending request, obtainsa star character that is selected by the first user on the video dataselection interface as video data of a video data role.

(2) The first terminal generates a red packet according to the selectedvideo data, an identifier of the first user, and the amount of money,displays the star character of the video data at a transparent layer ona message body of the red packet, and provides a play/pause key at thetransparent layer of the message body of the red packet.

In this embodiment, the first terminal may further obtain the quantityof which the amount of money in the red packet is divided and a divisionmanner. The division manner may be an even division, a random division,or the like.

(3) The first terminal sends, to a second user by using an instantmessaging session window, the red packet sent by the first user to thesecond user.

As shown in FIG. 12, the red packet is sent on the group sessioninterface, and the star character of the video data and the play/pausekey are displayed on the surface of the red packet.

(4) After members in the group receive the red packet on the chatinterface by using a second terminal, the members play the video data inthe red packet, accept the amount of money, and display the alias of thefirst user and description in words.

As shown in FIG. 13, after receiving the red packet on the group sessioninterface, the second user taps the red packet, and accepts 0.5 yuan.Dai Xingxing is displayed as the first user, the description in words of“Diligence is the path to the mountain of knowledge, hard-working is theboat to the endless sea of learning” is displayed, a control for “Viewdetails of acceptance” is provided, and which users that accept the redpackets and the amounts of money corresponding to the red packets may beviewed.

For example, the resource message is a red packet, the resource is theamount of money in the red packet, and the red packet type is a New Yeargreeting red packet. The resource sharing method include the followingsteps:

(1) The first terminal obtains a New Year greeting red packet sendingrequest initiated by the first user, prompts, according to the New Yeargreeting red packet, the first user to record a voice or video data witha pre-determined time, and uploads the voice or the video data to aserver. The server allocates a unique voice identifier to the voice,allocates a unique video identifier to the video data, and establishesan association relationship between the voice identifier and the videoidentifier and the identifier of the first user.

Specifically, the recorded voice or video data may be “Happy New Year!”and the like, and is not limited thereto.

(2) The first terminal obtains basic information of a red packet enteredby the first user, generates the red packet by using the basicinformation of the red packet and the recorded voice or video data, andsends the red packet to a person or a group.

(3) After receiving the red packet, a second user taps to accept the redpacket, and the voice or the video data is automatically played on asecond terminal that the second user is on.

As shown in FIG. 14, in an embodiment, a resource sharing method isprovided. This embodiment is described by using an example in which themethod is applied to the terminal 110 shown in FIG. 1 and FIG. 2. Themethod specifically includes following steps:

Step 1402: Configure a to-be-shared resource, to obtain data needed forobtaining a resource.

Specifically, the terminal may receive a resource sharing instruction,trigger to enter a resource configuration page according to the resourcesharing instruction, and display configuration items of the to-be-sharedresource on the resource configuration page, so as to obtain aconfiguration parameter of the to-be-shared resource according toconfiguration instructions for all the configuration items. Theconfiguration items are for example, a resource type, a resource share,a resource allocation manner, and an attribute of a user capable ofobtaining a resource that are of the to-be-shared resource. Theconfiguration parameter is a specific value after the configurationitems are configured. The resource type is for example, a currency redpacket type, a physical red packet type, or a voucher red packet type.The resource share is for example, a currency amount, and a resourceallocation manner such as even distribution or random distribution. Theattribute of the user capable of obtaining the resource means that onlyfriends or only group members can obtain the red packet. Step 1402 maybe performed after step 1406.

The data needed for obtaining a resource is data needed for obtainingthe to-be-shared resource, and may include a resource identifier that isused to uniquely identify the to-be-shared resource; or may include auser identifier that is used to identify a user that initiates aresource sharing message; and may further include information about avalidity period of the resource sharing message.

Step 1404: Obtain a user identifier of a currently logged-in socialnetworking application.

The social networking application is an application for socialnetworking and interaction based on a social network. The socialnetworking application generally has a contact searching function and aninstant messaging function, and may further have a user generatedcontent (UGC) sharing function and a UGC commenting function. The socialnetworking application may be an instant messaging application, a socialnetwork sites (SNS) application, or the like. The user identifier, ofthe currently logged-in social networking application, obtained by theterminal may be an account entered by the user when the user logs in tothe social networking application, or may be a unique character stringgenerated according to the account.

Step 1406: Obtain a resource sharing message image template, auser-defined visible element, and configuration information of thevisible element that are associated with the user identifier.

Specifically, the terminal may perform query locally or query a serverfor the resource sharing message image template, the user-definedvisible element, and the configuration information of the visibleelement that are associated with the user identifier. The resourcesharing message image template, the user-defined visible element, andthe configuration information of the visible element are used to draw aresource sharing message image, and may be collectively referred to asdrawn data for ease of description.

In an embodiment, the terminal may determine whether locally therestores the drawn data, if locally there stores the drawn data, query theserver whether a change occurs in the drawn data corresponding to theuser identifier, in a time period from a time when the drawn data isobtained last time to a current time; and if no change occurs, directlylocally obtain the drawn data corresponding to the user identifier; orif a change occurs or if locally there does not store the drawn data,query the server for the drawn data corresponding to the useridentifier.

The resource is an object whose ownership can be obtained by using anetwork and includes at least one of a virtual object and a physicalobject. The virtual object includes at least one of an account value, avirtual image product, a virtual prepaid card, game equipment, andvirtual currency. The physical object may be an object that can bearbitrarily owned by the user and that has an actual form, and is forexample, an electronic product, a toy, an artifact, and a signed photo.

The resource sharing message image is an image that is displayed when aresource message is displayed, and the resource sharing message imagetemplate is a template-assisted resource sharing message image. Theresource sharing message image template constrains overall attributessuch as the overall shape and size of the resource sharing messageimage, and may further limit information about the shape, the size, andthe location of an editing area that is used to accommodate theuser-defined visible element.

The visible element refers to data that can be displayed and that isvisible to human eyes, and is used to transfer information. The visibleelement may include a combination of one or more of a character, apicture, and an animated file. The format of the picture may use a JPEGformat (a picture format, and an image compression standard that isspecified by a Joint Photographic Experts Group), a PNG format (fullname: Portable Network Graphic Format, meaning a portable networkgraphic format), or another custom image format. The image may include astatic image and a dynamic image, and the dynamic image may use the GIFformat (full name: Graphics Interchange Format). The animated file mayuse an SWF format (full name: shock wave flash, a FLASH animated fileformat provided by the Adobe company) or another custom animated fileformat.

The configuration information of the visible element is used to describean attribute of the user-defined visible element, and a relationshipbetween the user-defined visible element and the resource sharingmessage image template. The configuration information of the visibleelement may specifically include the size of the visible element, andthe location of the visible element relative to the resource sharingmessage image template.

For example, if the visible element includes a character, thecorresponding configuration information may include for example, a font,a word space, a word size, an alignment format, and a character colorthat are used to describe information about the attribute of thecharacter, and may further include the location of the character in acorresponding resource sharing message image template. If the visibleelement includes an image, the corresponding configuration informationmay include a transparency degree and the location of the image in theresource sharing message image template.

Step 1408: Draw a resource sharing message image according to theresource sharing message image template, the visible element, and theconfiguration information, and display the resource sharing messageimage on a social network propagation page of the social networkingapplication.

Specifically, the terminal mixes the resource sharing message imagetemplate with the visible element according to the configurationinformation of the visible element, to draw the resource sharing messageimage. Further, the terminal may draw the visible element according toinformation that is used to describe the attribute of the visibleelement and that is in the configuration information, and mix thevisible element with the resource sharing message image templateaccording to information that is used to describe information about thelocation and that is in the configuration information.

The social network propagation page is a page that is of the socialnetworking application and that can be accessed by a social friend andthat can propagate a message, and is for example, a session page, a UGCsharing page, or a personal page that can be accessed by the public. Thesession page includes a one-to-one session page and a group sessionpage.

Step 1410: Transfer, by using a social network, a resource sharingmessage corresponding to the resource sharing message image, theresource sharing message including the data needed for obtaining aresource.

Specifically, the terminal may generate a resource sharing messagecorresponding to the resource sharing message image, and propagate theresource sharing message by using a message channel of the socialnetwork. A propagation object is related to the type of the socialnetwork propagation page. For example, if the social network propagationpage is the one-to-one session page, the propagation object may be anidentifier of another user who is in a session with a current user; orif the social network propagation page is the group session page, thepropagation object may be all group members except the current useridentifier in a current group.

The resource sharing message includes the data needed for obtaining aresource, and further includes the resource sharing message image, ordata used to obtain the resource sharing message image. The data neededfor obtaining a resource may include a resource identifier used touniquely identify a resource that can be obtained; or may include a useridentifier used to identify the user that initiates the resource sharingmessage; or may include a validity period of the resource sharingmessage. The data used to obtain the resource sharing message image maybe the user identifier, or may be an access address of the resourcesharing message image, or may be the resource sharing message imagetemplate, the user-defined visible element, and an access address of theconfiguration information of the visible element that are associatedwith the user identifier.

According to the resource sharing method, a user defines the visibleelement, and associates the resource sharing message image template, thevisible element, and the configuration information of the visibleelement with the user identifier, so that when the user needs to share aresource, the user can obtain the resource sharing message imagetemplate, the visible element, and the configuration informationaccording to the user identifier, so as to complete drawing of theresource sharing message image. The resource sharing message image isdisplayed on the social network propagation page of the socialnetworking application, and the resource is shared by transferring theresource sharing message by using the social network. The resourcesharing message image has the user-defined visible element, so that theresource sharing message can be conveniently and efficiently identified.

In an embodiment, the method further includes: playing custom audio whenthe resource sharing message image is displayed on the social networkpropagation page. The audio may be user-defined audio, or may bespecifically real-time recorded audio, or may be audio selected locally,or may be audio selected from an audio set provided on the server.

In an embodiment, the method further includes: obtaining an identifierof the audio, and step S1410 includes: generating a resource sharingmessage including the data needed for obtaining a resource and theidentifier of the audio, where the resource sharing message correspondsto the transferred resource sharing message image; and transferring theresource sharing message by using the social network.

The identifier of the audio is used to uniquely identify correspondingaudio. The identifier of the audio is used to obtain the audio and playthe audio. The audio may be specifically music or a voice. Theidentifier of the audio may be a uniform resource locator (URL) of theaudio, and the URL of the audio may be generated by the terminal afterthe terminal uploads the audio to the server.

In this embodiment, the resource sharing message propagated by using thesocial network can not only be used to share the resource, but also playparticular audio at a receiving end, so as to increase an amount oftransferred information.

As shown in FIG. 15, in an embodiment, the resource sharing methodfurther includes steps of customizing a resource sharing message imagetemplate, and specifically includes the following steps:

Step 1502: Select a resource sharing message image template fromcandidate resource sharing message image templates.

Specifically, the terminal may detect an operation on a resource sharingmessage image configuration control on the social network propagationpage, so as to enter a resource sharing message image configuration pageaccording to the detected operation. The detected operation may bemanners such as touching and holding, tapping, sliding, and multi-touch.

The terminal pulls the candidate resource sharing message image templatelist from the server and displays the candidate resource sharing messageimage template list on the resource sharing message image configurationpage, receives a user selection instruction, and selects the resourcesharing message image template from the candidate resource sharingmessage image templates according to the user selection instruction.

Step 1504: Obtain a user-defined visible element.

Specifically, the terminal may obtain a character entered by the user,or select a picture or an animated file according to a user selectioninstruction. In an embodiment, if the terminal does not detect anoperation of defining a visible element by the user, the user obtains adefault visible element of the selected resource sharing message imagetemplate, and uses the default visible element as the user-definedvisible element.

In an embodiment, the terminal may display a preview image that is ofthe resource sharing message image and that is generated by adding thevisible element to an editing area of the selected resource sharingmessage image template. In this way, the user can preview the resourcesharing message image, and accurately learn a result of defining thevisible element by the user.

Step 1506: Obtain configuration information corresponding to theuser-defined visible element.

Specifically, after receiving an instruction that is of determining theconfiguration that is triggered by the user, the terminal may obtain theconfiguration information corresponding to the user-defined visibleelement. The obtained configuration information may includeconfiguration information input by the user and configurationinformation that is automatically calculated.

Step 1508: Associate the selected resource sharing message imagetemplate, the user-defined visible element, and the obtainedconfiguration information with a user identifier.

Specifically, the terminal may associate the selected resource sharingmessage image template, the user-defined visible element, and theobtained configuration information with a user identifier on the server.The terminal may transfer the user identifier, an identifier of theresource sharing message image template, the user-defined visibleelement, and the corresponding configuration information to the server,and the server associates the selected resource sharing message imagetemplate, the user-defined visible element, and the obtainedconfiguration information with the user identifier.

In this embodiment, by means of a self-defined configuration, the usercan freely select the resource sharing message image template from thecandidate resource sharing message image templates as he intends, andcan define the visible element corresponding to the selected resourcesharing message image template. In this way, a probability thatdifferent users have a same resource sharing message image is furtherdecreased, and identifiability of the resource sharing message isfurther enhanced.

In an embodiment, before step 1504, the method further includes:obtaining a constraint condition corresponding to the selected resourcesharing message image template; and step 1504 includes obtaining theuser-defined visible element under the constraint condition.

The constraint condition is a condition that the user-defined visibleelement should satisfy, may include a constraint on the attribute of thevisible element, and may further include a constraint on the location ofthe visible element relative to the selected resource sharing messageimage template. For example, the constraint condition may be aconstraint on the size, the quantity, the location, the color, thetransparency degree, and the like of the visible element.

Specifically, the server pre-stores a constraint condition correspondingto each resource sharing message image template, and the terminal mayobtain the constraint condition corresponding to the selected resourcesharing message image template from the server after selecting theresource sharing message image template. The terminal may display aprompt of the constraint condition, to guide the user to input or selectas quickly as possible, according to the constraint condition, thevisible element meeting the constraint condition.

When obtaining the user-defined visible element under the constraintcondition, the terminal may specifically determine whether the visibleelement on which the user-defining operation has been performedsatisfies the constraint condition, and reject the user-definingoperation if the visible element does not satisfy the constraintcondition; or accept the user-defining operation if the visible elementsatisfies the constraint condition. The user-defining operation may be,for example, uploading the visible element, increasing the quantity ofvisible elements, modifying the size of the visible element, or movingthe location of the visible element.

In an embodiment, the selected resource sharing message image templatehas the corresponding constraint condition, and the visible element isobtained under the constraint condition and is associated with the useridentifier. In this way, an error that occurs during drawing of theresource sharing message image can be avoided, so as to avoid incorrectresource sharing.

As shown in FIG. 5, in an embodiment, the resource sharing methodfurther includes steps of obtaining a resource, and specificallyincludes the following steps:

Step 1602: Obtain an operation instruction for a displayed resourcesharing message image.

Specifically, the terminal that initiates resource sharing may obtainthe operation instruction for the displayed the resource sharing messageimage; and a terminal that receives a resource sharing message maydisplay the resource sharing message image according to the receivedresource sharing message, and obtain the operation instruction for thedisplayed resource sharing message image. The operation instruction maybe triggered in manners such as touching and holding, tapping, sliding,and a multi-touch.

Step 1604: Generate, according to the operation instruction, a resourceobtaining request that includes a resource identifier and a resourceobtaining party identifier.

Specifically, the terminal extracts the resource identifier from theresource sharing message according to the operation instruction, andgenerates the resource obtaining request that includes the resourceidentifier and the resource obtaining party identifier. The resourceobtaining party identifier may be an identifier of a user that requeststo obtain a resource, or may be a user identifier to which the terminaltriggering the operation instruction logs in.

In an embodiment, the terminal may extract the resource identifier fromthe resource sharing message according to the operation instruction, andquery the server whether the currently logged-in user identifier haspermission to obtain a resource corresponding to the resourceidentifier; and generate, according to the operation instruction, theresource obtaining request including the resource identifier and theresource obtaining party identifier if the currently logged-in useridentifier has the permission to obtain the resource corresponding tothe resource identifier; or skip performing an action or prompting thatthe extraction fails if the currently logged-in user identifier does nothave the permission to obtain the resource corresponding to the resourceidentifier.

In an embodiment, the method further includes: obtaining, according tothe operation instruction, custom audio corresponding to the resourcesharing message image, and playing the audio. In this embodiment, whenthe resource is obtained, the custom audio may be played, more amount ofinformation may be transferred, and that the action of obtaining theresource occurs may be reminded.

Step 1606: Send the resource obtaining request to a server, so that theserver allocates, to the resource obtaining party identifier, a resourcecorresponding to the resource identifier.

Specifically, the terminal sends the resource obtaining request to theserver, and the server obtains the resource identifier and the resourceobtaining party identifier according to the resource obtaining request,so as to allocate, to the resource obtaining party identifier, theresource corresponding to the resource identifier. After receiving theresource obtaining request, the server determines whether there is aremaining share in the resource corresponding to the resourceidentifier, and if there is the remaining share, allocates, to theresource obtaining party identifier, a resource from the remainingresource, decreases a corresponding share, and feeds back, to theterminal, a resource obtaining result indicating that the resource issuccessfully obtained; or if there is no remaining share, directly feedsback, to the terminal, a resource obtaining result indicating that theresource is not successfully obtained.

When the server allocates a resource, if the resource is a resource thatis to be allocated as per a value, such as a value of a virtual redpacket or a prepaid card, when the server allocates a resource to theresource obtaining party identifier, the server may select a value froma preset value range randomly or according to a preset fixed value, andtransfer the value into a value account corresponding to the resourceobtaining party identifier. The value account includes a cash account ora voucher account, and the value account may be set on a bank server ora third-party payment server. If the resource is a resource that can beobtained after registration, such as a physical object, when the serverallocates the resource to the resource obtaining party identifier, theserver may record a correspondence between the resource and the resourceobtaining party identifier to represent an ownership of a correspondinguser on the resource, so that the resource is subsequently provisionedin other forms.

Step 1608: Receive a resource obtaining result fed back by the server.

Specifically, the resource obtaining result includes a result indicatingthat the resource is successfully obtained and a result indicating thatthe resource is not successfully obtained. The terminal receives theresource obtaining result fed back by the server after the serverallocates the resource. The result indicating that the resource issuccessfully obtained further includes description information of theobtained resource, for example, the value of accepted red packets.

Step 1610: Display a result displaying page having a custom backgroundimage that matches the visible element, and display the resourceobtaining result on the result displaying page.

Specifically, the terminal displays the result displaying page, theresult displaying page has a custom background image, the custombackground image matches the visible element, and the terminal displaysthe resource obtaining result on the result displaying page. The custombackground image matches the visible element. Specifically, the custombackground image may be an image obtained after the visible element iszoomed in or zoomed out, or may be an image obtained after the visibleelement is re-arranged. The custom background image may be fused withthe result displaying page in a watermark manner.

In this embodiment, the resource sharing message image may trigger anaction of obtaining a resource, and display the resource obtainingresult on the result displaying page. The result displaying page has acustom background image that matches the visible element, so that moreinformation can be transferred, and interaction manners between usersare added.

In an embodiment, step 1406 includes: querying a server for the resourcesharing message image template, the user-defined visible element, andthe configuration information of the visible element that are associatedwith the user identifier; perform step 1408 if the resource sharingmessage image template, the user-defined visible element, and theconfiguration information of the visible element that are associatedwith the user identifier are found; and obtaining a resource sharinginstruction, and performing, according to the resource sharinginstruction, the step of displaying the resource sharing message imageon a social network propagation page of the social networkingapplication.

Specifically, before initiating resource sharing, for example, afterlogging in to the social networking application, or after completingcustomized configuration of the resource sharing message image template,the terminal may query the server for the resource sharing message imagetemplate, the user-defined visible element, and the configurationinformation of the visible element that are associated with the useridentifier. If the resource sharing message image template, theuser-defined visible element, and the configuration information of thevisible element that are associated with the user identifier are found,the resource sharing message image is drawn according to drawn datafound in a memory. If the resource sharing message image template, theuser-defined visible element, and the configuration information of thevisible element that are associated with the user identifier are notfound, it indicates that the user does not customize the resourcesharing message image template, and a default resource sharing messageimage on social networking application is used in subsequent resourcesharing.

When the terminal detects an action that triggers to share a resource,for example, when a button for sharing a resource is pressed down, acorresponding resource sharing instruction is obtained. The terminalcompletes a resource configuration on the server according to theresource sharing instruction, and obtains data needed for obtaining aresource corresponding to the configured resource. The resourceconfiguration is for example, a configuration of a resource type, aconfiguration of a resource share, and a configuration of a resourceallocation manner.

In this embodiment, after the drawn data is found in the server, theresource sharing message image may be drawn in advance in the memory, sothat when an operation of resource sharing is performed, the resourcesharing message image that is drawn in advance in the memory may beimmediately displayed on the social network propagation page. Drawingtakes more time than displaying does. Therefore, by drawing the resourcesharing message image in advance, the resource sharing efficiency isdramatically improved.

In an embodiment, a resource sharing message image template is a redpacket image template, a resource sharing message image is a red packetimage, a resource sharing message is a red packet message, a red packetmessage a special message, social network propagation page is a sessionpage, and a resource sharing message image configuration page is a redpacket image configuration page. A red packet is a gift having anattribute of a currency equivalent, and a virtual red packet is a redpacket in an electronic format and is processed by a computer. As shownin FIG. 15, a resource sharing method specifically includes thefollowing steps:

Step 1702. Enter a red packet image configuration page by using a socialnetworking application.

Referring to FIG. 18, after a user logs in to the social networkingapplication, the user enters a session page, and taps a red packet imageconfiguration control 1801 in a toolbar of the session page to enter thered packet image configuration page shown in FIG. 19.

Step 1704: Obtain candidate red packet image templates from a server,and select a red packet image template from the candidate red packetimage templates.

For example, when entering the red packet image configuration page, thesocial networking application pulls a candidate red packet imagetemplate list from the server, and displays the candidate red packetimage template list on the red packet image configuration page. Thecandidate red packet image templates 1910, 1920, and 1930 are shown inFIG. 19. In FIG. 19, the user selects the candidate red packet imagetemplate 1920, and displays an enlarged view of the candidate red packetimage template 1920 on the social networking application.

Step 1706: Obtain a constraint condition corresponding to the selectedred packet image template.

For example, the user taps an editing area 1921 a of a red packet imagetemplate 1921 shown in FIG. 19, and enters a red packet imageconfiguration page shown in FIG. 20. The social networking applicationobtains a constraint condition corresponding to the red packet imagetemplate 1921, and the constraint condition includes that the visibleelement is an English word.

Step 1708: Obtain a user-defined visible element under the constraintcondition.

For example, referring to FIG. 20, a prompt 2001 of the constraintcondition may be displayed on the social networking application. Theuser enters an English word “Rich” in an input box 2002, and a previewimage 2003 of a red packet image that is generated after the Englishword “Rich” is added to the editing area of the selected red packetimage template is displayed on the social networking application. Thesocial networking application may provide a switch 2004 that may switchthe visible element of the English word between capital letters andlower-case letters.

For another example, referring to FIG. 21, if the selected red packetimage template is 1910, a corresponding constraint condition includesthat the visible element is four English letters at most. The user mayenter one to four English letters under the constraint condition, andthe social networking application may adaptively adjust a word size ofthe English letters according to different quantities of the Englishletters. For another example, referring to FIG. 22, if the selected redpacket image template is 1930, a corresponding constraint conditionincludes that the visible element is an image format, and the size ofthe visible elements does not exceed a preset value.

Step 1710: Obtain configuration information corresponding to theuser-defined visible element.

Step 1712: Obtain a user identifier of a currently logged-in socialnetworking application, and associate the selected red packet imagetemplate, the user-defined visible element, and the obtainedconfiguration information with the user identifier on the server.

Step 1713: Configure a to-be-shared resource, to obtain data needed forobtaining a resource.

Step 1714: Query the server for the red packet image template, theuser-defined visible element, and the configuration information of thevisible element that are associated with the user identifier.

For example, when the user taps a virtual red packet trigger control1802 on a session page shown in FIG. 18, the social networkingapplication triggers to query the server for drawn data, or when theuser taps a virtual red packet trigger control 2005 on the red packetimage configuration page, the social networking application triggers toquery the server for the drawn data.

Step 1716: Draw a red packet image according to the red packet imagetemplate, the visible element, and the configuration information.

Step 1718: Display the red packet image on a session page of the socialnetworking application.

Step 1720: Transfer, by using a social network, a red packet messagethat corresponds to the red packet image and that includes data neededfor allocating a value, where a resource sharing message includes thedata needed for obtaining a resource.

For example, referring to FIG. 23, when displaying the red packetmessage sent by the user, the social networking application displays ared packet image 2301 of the red packet message, and transfers the redpacket message to a session object (one or more) on the session page byusing the social network. The session object can also send the redpacket message. For example, after receiving a red packet message sentby the session object, the terminal displays the red packet image 21402of the red packet message.

Step 1722: Obtain an operation instruction for the displayed red packetimage. For example, referring to FIG. 24, the user can tap a red packetimage 2401 to trigger the operation instruction.

Step 1724: Generate, according to the operation instruction, a valueallocation request including a red packet identifier and a valuerequirement party identifier.

Step 1726: Send the value allocation request to the server, so that theserver selects some or all values from a remaining value sharecorresponding to the red packet identifier, and allocates the some orall values to a value account corresponding to the value requirementparty identifier.

Step 1728: Receive a value allocation result fed back by the server.

Step 1730: Display a result displaying page having a custom backgroundimage that matches the visible element, and display the value allocationresult on the result displaying page.

For example, referring to FIG. 25, the social networking applicationdisplays a result displaying page 2501 in a red packet format, and theresult displaying page 2501 displays a value allocation result 21602,and a custom background image 2503 of the result displaying page 2501matches the user-defined visible element.

In this embodiment, in the session page of the social networkingapplication, a red packet message sent by each user may have desirableidentifiability, and a particular red packet message can be efficientlyidentified in a multi-user session scenario. Moreover, the multipleusers can interact with each other in the session page by mean of thered packet image, as shown in FIG. 23.

As shown in FIG. 26, in an embodiment, a resource sharing method isprovided. This embodiment is described by using an example in which themethod is applied to the first terminal 110 shown in FIG. 1. The methodspecifically includes following steps:

Step 2602. Receive a resource sharing message configuration file that isdelivered in a pre-configured delivery time period.

Specifically, the resource sharing message configuration file is a filerecording a configuration parameter that is used to generate a resourcesharing message, and may include one of a theme name, a themeidentifier, a theme activity start time, a theme activity end time, alink address of a resource sharing message image, a resource sharingmessage text, and a resource information, or a combination thereof. Thetheme identifier is different from the theme name.

A server may provide an operation configuration page, obtain aconfiguration parameter according to a configuration operation in aconfiguration item on the operation configuration page, generate theresource sharing message configuration file according to theconfiguration parameter, obtain the delivery time period, and deliverthe resource sharing message configuration file in the configureddelivery time period. The delivery time period may be represented by adelivery start time and a delivery end time.

The resource is an object whose ownership can be obtained by using anetwork and includes at least one of a virtual object and a physicalobject. The virtual object includes at least one of an account value, avirtual image product, a virtual prepaid card, game equipment, andvirtual currency. The physical object may be an object that can bearbitrarily owned by the user and that has an actual form, and is forexample, an electronic product, a toy, an artifact, and a signed photo.

Step 2604. Obtain a theme activity time period according to the resourcesharing message configuration file.

Specifically, the theme activity time period is a time period of theresource sharing message that is generated by using the resource sharingmethod provided in this embodiment of this application and that hasspecified theme semantics. The theme activity time period may berepresented by using the theme activity start time and the themeactivity end time. The first terminal may directly read the themeactivity time period from the resource sharing message configurationfile, or may pull the theme activity time period from the serveraccording to the link address in the resource sharing messageconfiguration file.

Step 2606. Display a resource sharing message configuration portal inthe theme activity time period.

Specifically, the first terminal may display the resource sharingmessage configuration portal when a current time is greater than orequal to the theme activity start time, and end display of the resourcesharing message configuration portal when the current time is greaterthan the theme activity end time. The resource sharing messageconfiguration portal is used to trigger to enter a resource sharingmessage configuration page, to complete necessary configurations on theresource sharing message. The resource sharing message configurationportal may be represented in a form of an icon, a hyperlink, or abutton. For example, the first terminal may display a session toolbar ina session page shown in FIG. 27, and display a resource sharing messageconfiguration portal 2701 in the session toolbar.

Step 2608. Detect an operation on the resource sharing messageconfiguration portal, and enter a resource sharing message configurationpage.

Specifically, the first terminal detects a pre-defined operation actingon the resource sharing message configuration portal, and enters theresource sharing message configuration page if detecting the pre-definedoperation. The resource sharing message configuration page may be in aform of a floating layer or a window. The pre-defined operation is, forexample, a one-tap operation, a double-tap operation, a slide-operation,or a multi-touch operation.

Step 2610. Obtain, according to a configuration performed on theresource sharing message configuration page, a resource sharing messagetemplate matching the theme activity time period and resourceinformation matching the resource sharing message template.

Specifically, the resource sharing message configuration page mayprovide one or more configuration items for a user to performconfiguration. After configuration is completed, a resource sharingmessage template having specified theme semantics and resourceinformation having a mapping relationship with the resource sharingmessage template are obtained.

The resource sharing message template refers to information that needsto be displayed when the resource sharing message is displayed, and mayinclude a resource sharing message image and a resource sharing messagetext. The resource sharing message image is an image displayed when theresource sharing message is displayed, and the resource sharing messagetext is a text, such as blessing words, displayed when the resourcesharing message is displayed. The resource information is informationabout a resource that corresponds to the resource sharing message, andincludes a resource share, such as a to-be-shared currency value; andthe resource information may further include a resource type.

That the resource sharing message template has specified theme semanticsmeans that the resource sharing message template conveys a specifiedtheme idea in a form of images and/or words, so that a person may obtainthe theme idea conveyed by the resource sharing message. The resourceinformation has a mapping relationship with the resource sharing messagetemplate, so that the configuration on the to-be-shared resource can berapidly completed, and the user does not need to enter the resourceinformation character by character.

For example, referring to FIG. 28, a resource sharing message templateincludes a resource sharing message image 2801 and a resource sharingmessage text 2802. The resource sharing message image 2801 includes animage of fish. In Chinese, a homophone of fish indicates a meaning of“remaining”. Herein, fish is used to express the meaning of thehomophone, and indicate a good wish that life is affluent and there aremore wealth and food than necessary. This is a traditional theme ideafor celebrating the Chinese Lunar New Year, and has theme semantics ofexpressing New Year's blessings. The resource sharing message text 2802expresses the theme semantics of the New Year's blessings in words. Thetheme semantics expressed by the resource sharing message image 2801 isthe same as that expressed by the resource sharing message text 2802.

Referring to FIG. 29, a resource sharing message template includes aresource sharing message image 2901 and a resource sharing message text2902. The resource sharing message image 2901 expresses theme semanticsof Lantern Festival blessings by means of food in a bowl in an image,and the resource sharing message text 2902 expresses theme semantics ofLantern Festival blessings in words. The Lantern Festival is a Chinesetraditional festival, and falls on the fifteen day of the Chinese LunarNew Year.

Referring to FIG. 30, a resource sharing message template includes aresource sharing message image 3001 and a resource sharing message text3002. The resource sharing message image 3001 expresses theme semanticsof Valentine's Day blessings by means of heart shapes and roses thatsymbolizes love and that are in an image, and the resource sharingmessage text 3002 expresses theme semantics related to love in words.

Referring to FIG. 31, a resource sharing message template includes aresource sharing message image 3101 and a resource sharing message text3102. The resource sharing message image 3101 expresses theme semanticsof New Year blessings by means of a calendar and a lantern in an image,and the resource sharing message text 3102 expresses theme semantics ofNew Year blessings in words.

Step 2612. Generate a resource sharing message according to the obtainedresource sharing message template and resource information, the resourcesharing message including data for obtaining a resource.

The resource sharing message is used to trigger an action of obtaining aresource. The first terminal may generate the resource sharing messageaccording to the obtained resource sharing message template and resourceinformation, so that the generated resource sharing message hasfunctions of obtaining a resource corresponding to the resourceinformation and displaying the resource sharing message template.

Specifically, the generated resource sharing message may include thelink address of the resource sharing message image, so that the firstterminal may obtain and display the resource sharing message imageaccording to the link address in the resource sharing message. Thegenerated resource sharing message may include the resource sharingmessage text, so that the first terminal may display the resourcesharing message text in the resource sharing message. The generatedresource sharing message may further include the theme identifier, sothat the first terminal may obtain and display a corresponding resourcesharing message image and resource sharing message text according to thetheme identifier. The generated resource sharing message may include thedata for obtaining a resource, so that the first terminal may obtain aresource according to the data.

The data needed for obtaining a resource is data needed for obtaining ato-be-shared resource, and may include a resource identifier that isused to uniquely identify the to-be-shared resource; or may include auser identifier that is used to identify a user that initiates aresource sharing message; and may further include information about avalidity period of the resource sharing message.

The first terminal may display the resource sharing message template ona social network propagation page of a social networking application.Specifically, the first terminal may draw and display the resourcesharing message image on the social network propagation page, anddisplay the resource sharing message text in a specified area of theresource sharing message image.

The social networking application is an application for network socialnetworking and interaction based on a social network. The socialnetworking application generally has a contact searching function and aninstant messaging function, and may further have a user generatedcontent (UGC) sharing function and a UGC commenting function. The socialnetworking application may be an instant messaging application, a socialnetwork sites (SNS) application, or the like. The social networkpropagation page is a page, of the social networking application, thatcan be accessed by a social friend and that can propagate a message, andis for example, a session page, a UGC sharing page, or a personal pagethat can be accessed by the public. The session page includes aone-to-one session page and a group session page.

Step 2614. Share the resource sharing message.

Specifically, the first terminal may propagate the resource sharingmessage by using a social network. Specifically, the first terminalpropagates the resource sharing message by using a message channel of asocial network. A propagation object is related to the type of thesocial network propagation page when resource sharing is currentlytriggered. For example, if the social network propagation page is theone-to-one session page, the propagation object may be an identifier ofanother user who is in a session with a current user; or if the socialnetwork propagation page is the group session page, the propagationobject may be all group members except the current user identifier in acurrent group.

According to the resource sharing method, the resource sharing messageconfiguration file that is delivered in the pre-configured delivery timeperiod is received, and the server can flexibly control the deliverytime period of the resource sharing message configuration file that isused to generate the resource sharing message. The theme activity timeperiod is obtained according to the resource sharing messageconfiguration file, so that display of the resource sharing messageconfiguration portal may be controlled by using the theme activity timeperiod, and the resource sharing message generated in the theme activitytime period may be accurately and flexibly controlled. The resourcesharing message is generated according to the resource sharing messagetemplate matching the theme activity time period and the correspondingresource information. Therefore, the resource sharing message includingthe data for obtaining a resource is shared, and a message receivingparty can obtain semantics that match the theme activity time period andthat are sent by a resource sharing party while obtaining a resource byusing the resource sharing message, so that more amount of usefulinformation is conveyed.

In an embodiment, step 2602 specifically includes: receiving a resourcesharing message configuration file that is delivered in thepre-configured delivery time period according to a correspondingdelivery policy, wherein the delivery policy includes at least one of adelivery target user, a terminal operating system type, and a deliverytarget area.

Specifically, a server may provide an operation configuration page,obtain a configuration parameter according to a configuration operationin a configuration item on the operation configuration page, andgenerate the resource sharing message configuration file and a deliverypolicy according to the configuration parameter, so that the serverdelivers the resource sharing message configuration file to a firstterminal according to the delivery policy. That the server delivers theresource sharing message configuration file according to thepre-configured delivery policy specifically means that the serverdelivers the resource sharing message configuration file in the deliverytime period according to at least one of the delivery target user, theterminal operating system type, and the delivery target area.

The delivery policy includes at least one of the delivery target user,the terminal operating system type, and the delivery target area. Thedelivery target user may be represented in a target user identifier or auser attribute of a delivery target. The terminal operating system typeis, for example, an iOS operating system or an Android operating system.The delivery target area may be a geographic area or an administrativelydivided area.

In this embodiment, by means of the pre-configured delivery policy,delivery of the resource sharing message configuration file by theserver to the terminal may be flexibly controlled, and a user group forresource allocation can be freely selected by using the resource sharingmethod provided in this embodiment of this application.

As shown in FIG. 32, in an embodiment, step 2610 includes the followingsteps:

Step 3202. Display, on a resource sharing message configuration pageaccording to a resource sharing message configuration file, a candidateresource sharing message template matching a theme activity time period,and candidate resource information.

Specifically, the first terminal obtains, according to the resourcesharing message configuration file, and displays a candidate resourcesharing message template having specified theme semantics, and obtainsand displays candidate resource information matching the resourcesharing message template. When the first terminal obtains, according tothe resource sharing message configuration file, the candidate resourcesharing message template having specified theme semantics, the firstterminal may specifically download a resource sharing message image froma server according to an image link in the resource sharing messageconfiguration file, or may directly read the resource sharing messageimage from the resource sharing message configuration file; and thefirst terminal may directly read a resource sharing message text fromthe resource sharing message configuration file. For example, referringto FIG. 30, the first terminal may display a resource sharing messageimage 3001 and a resource sharing message text 3002 on a resourcesharing message configuration page 3003.

Step 3204. Receive a switch instruction, and switch the displayedresource sharing message template and/or the displayed resourceinformation, where a displayed resource sharing message template afterthe switching matches displayed resource information after theswitching.

Specifically, the first terminal may display a switch control that isconfigured to trigger the switch instruction, and trigger the switchinstruction on detecting a pre-defined operation on the switch control.After the switch instruction is received, at least one of the displayedresource sharing message template and the displayed resource informationis switched according to the switch instruction. In FIG. 28, a resourceshare switching manner is used. After the switching is performed, thedisplayed resource sharing message template still has the specifiedtheme semantics, and the displayed resource information and thedisplayed resource sharing message template still have a mappingrelationship. The displayed resource sharing message template andresource information are a set.

For example, referring to FIG. 30, the first terminal displays a switchcontrol 3004, a user taps the switch control 3004 to trigger a switchinstruction, and the first terminal switches, according to the switchinstruction, to another resource share, such as to a resource share thathas the same specified semantics as “1314” or “52.00” has. In Chinese,“1314” pronounces similarly to an idiom expressing a lifetime and isused to express a good wish of the lifetime love; and in Chinese, “520”pronounces similarly to “I love you” and is used by lovers to expresslove.

Step 3206. Receive an acknowledgement instruction, and obtain thecurrently displayed resource sharing message template and resourceinformation according to the acknowledgement instruction.

Specifically, the first terminal may display a confirm controlconfigured to trigger an acknowledgement instruction, trigger theacknowledgement instruction after detecting a pre-defined operation onthe confirm control, and obtain the currently displayed resource sharingmessage template and the currently displayed resource informationaccording to the touch control instruction. The obtained resourcesharing message template and resource information are used to generate aresource sharing message.

In this embodiment, a candidate resource sharing message template thathas specified theme semantics and candidate resource informationmatching the candidate resource sharing message template are provided,switching is performed according to a switch instruction, and a finallyselected resource sharing message template and finally selected resourceinformation are confirmed according to the acknowledgement instruction.A user may be favored, to some extent, with a capability of making achoice as he wishes and the user does not need to perform moreoperations, and variety of the resource sharing message and convenienceof operations may be also considered.

In an embodiment, the resource sharing message template includes aresource sharing message image and a resource sharing message text, andthe resource information includes a resource share. The method furtherincludes steps of obtaining the resource share by means of payment.Referring to FIG. 33, the method specifically includes the followingsteps:

Step 3302. Initiate a payment request corresponding to a resource share.

Step 3304. Receive a payment result corresponding to the paymentrequest.

The first terminal may enter a payment page shown in FIG. 34, and obtaindata needed for payment, so as to generate the payment request accordingto the data needed for payment, and send the payment request to a serveror a third-party payment platform. The server or the third-party paymentplatform processes the payment request, and returns a payment result tothe first terminal.

Specifically, the first terminal may obtain a payer account identifierand a payment amount corresponding to a resource share, generate apayment request carrying the payer account identifier and the paymentamount, and send the payment request to the server or the third-partypayment platform. The server or the third-party payment platformdeducts, according to the payment request, the payment amount from apayment account corresponding to the payer account identifier, adds thepayment amount to a pre-configured recipient account to completepayment, and returns, to the first terminal, a result indicating thatthe payment is successful.

Step 3306. Transmit a resource sharing message image, and display aresource sharing message text and the resource share on the resourcesharing message image.

Specifically, after receiving the result indicating that the payment issuccessful, the first terminal transmits the resource sharing messageimage, and may specifically transmit the resource sharing message imageto the second terminal by using the server. The first terminal and thesecond terminal may display the resource sharing message text and theresource share in a specified area of the resource sharing messageimage, and the first terminal still performs step 2612. After receivinga result indicating that the payment fails, the first terminal promptsthe user that the payment fails, and guides the user to re-perform thepayment.

In this embodiment, the payment request is initiated, the resourcesharing message image, the resource sharing message text, and theresource share are displayed on the social network propagation pageafter the result indicating that the payment succeeds is received, and adisplay effect of the resource sharing message on a message receivingend may be visually displayed.

As shown in FIG. 35, in an embodiment, the resource sharing methodfurther includes steps of obtaining a resource, and specificallyincludes the following steps:

Step 3502: Obtain an operation instruction for the displayed resourcesharing message image.

Specifically, the first terminal detects a pre-defined operation on thedisplayed resource sharing message image, and triggers a correspondingoperation instruction if detecting the pre-defined operation.

Step 3504. Generate, according to the operation instruction, a resourceobtaining request that includes a resource obtaining party identifier.

Specifically, after obtaining the operation instruction, the firstterminal may obtain a user identifier that currently logs in to a socialnetworking application, as the resource obtaining party identifier, andobtain data, such as a resource identifier, that is used for obtaining aresource and that is in the resource sharing message, so as to generatethe resource obtaining request carrying the resource obtaining partyidentifier. The resource obtaining party identifier is a uniqueidentifier of a party requesting for obtaining a resource.

Step 3506. Send the resource obtaining request to a server, so that theserver allocates a resource to the resource obtaining party identifieraccording to the resource share.

Specifically, the first terminal sends the resource obtaining request tothe server, and the server obtains the resource identifier and theresource obtaining party identifier according to the resource obtainingrequest, so as to allocate, to the resource obtaining party identifier,the resource corresponding to the resource identifier. After receivingthe resource obtaining request, the server determines whether there is aremaining share in the resource corresponding to the resourceidentifier, and if there is the remaining share, allocates, to theresource obtaining party identifier, a resource from the remainingresource, decreases a corresponding share, and feeds back, to the firstterminal, a resource obtaining result indicating that the resource issuccessfully obtained; or if there is no remaining share, directly feedsback, to the first terminal, a resource obtaining result indicating thatthe resource is not successfully obtained.

When the server allocates a resource, if the resource is a resource thatis to be allocated as per a value, such as a virtual red packet or avalue of a prepaid card, when the server allocates a resource to theresource obtaining party identifier, the server may select a value froma preset value range randomly or according to a preset fixed value, andtransfer the value into a value account corresponding to the resourceobtaining party identifier. The value account includes a cash account ora voucher account, and the value account may be set on a bank server ora third-party payment server. If the resource is a resource that can beobtained after registration, such as a physical object, when the serverallocates the resource to the resource obtaining party identifier, theserver may record a correspondence between the resource and the resourceobtaining party identifier to represent a ownership of a correspondinguser on the resource, so that the resource is subsequently provisionedin other forms.

For example, referring to FIG. 36, a first terminal may display aresource sharing message image 32801 on a session page, and a user maytrigger an operation instruction by tapping the resource sharing messageimage 32801, so as to trigger a resource obtaining request and send theresource obtaining request to a server. The server obtains a resourceaccording to the resource obtaining request. After receiving a resourceobtaining result fed back by the server, the first terminal may displaya result display page 32901 shown in FIG. 37, and display a resourceobtaining result 32902 on the result display page.

In this embodiment, by means of the operation instruction for theresource sharing message image, an action of obtaining a resource may betriggered and completed, so that the resource is conveniently shared.

As shown in FIG. 38, in an embodiment, another resource sharing methodis provided. This embodiment is described by using an example in whichthe method is applied to the server 120 in FIG. 1. A terminal thatreceives a resource sharing message configuration file in thisembodiment is the first terminal 110 in the foregoing the embodiments,and this embodiment may further include various steps performed by thefirst terminal in the resource sharing method of the foregoing variousembodiments. The resource sharing method of this embodiment specificallyincludes the following steps:

Step 33002. Obtain a pre-configured resource sharing messageconfiguration file.

Step 33004. Deliver the resource sharing message configuration file in apre-configured delivery time period, so that a terminal that receivesthe resource sharing message configuration file obtains a theme activitytime period according to the resource sharing message configurationfile, and the terminal obtains, in the theme activity time period, aresource sharing message template matching the theme activity timeperiod and resource information matching the resource sharing messagetemplate.

Step 3806. Receive a resource sharing message that is generatedaccording to the resource sharing message template and the resourceinformation and that is sent by the terminal, wherein the resourcesharing message includes data for obtaining a resource.

Step 3808. Share the resource sharing message.

In an embodiment, the step of delivering the resource sharing messageconfiguration file in a pre-configured delivery time period includes:delivering the resource sharing message configuration file in thepre-configured delivery time period according to a correspondingdelivery policy, wherein the delivery policy includes at least one of adelivery target user, a terminal operating system type, and a deliverytarget area.

In an embodiment, the resource sharing message template includes aresource sharing message image and a resource sharing message text, andthe resource information includes a resource share; and the resourcesharing method further includes: receiving a payment request that isinitiated by the terminal and that corresponds to the resource share;and performing a payment operation according to the payment request, andfeeding back a payment result to the terminal, so that the terminaltransmits the resource sharing message image, and displays the resourcesharing message text and the resource share in the resource sharingmessage image.

In an embodiment, the resource sharing method further includes:receiving a resource obtaining request that includes a resourceobtaining party identifier and that is triggered after the terminalperforms an operation on the displayed resource sharing message image;and allocating a resource to the resource obtaining party identifieraccording to the resource share.

According to the resource sharing method, the resource sharing messageconfiguration file is delivered in the pre-configured delivery timeperiod, and the delivery time period of the resource sharing messageconfiguration file that is used to generate the resource sharing messagecan be flexibly controlled. The terminal obtains the theme activity timeperiod according to the resource sharing message configuration file, soas to control, by using the theme activity time period, the resourcesharing message that is generated in theme activity time period. Theresource sharing message is generated according to the resource sharingmessage template matching the theme activity time period and thecorresponding resource information. Therefore, the resource sharingmessage including the data for obtaining a resource is shared, and amessage receiving party can obtain a resource by using the resourcesharing message and obtain semantics that match the theme activity timeperiod and that are sent by a resource sharing party, so that moreamount of useful information is conveyed.

As shown in FIG. 39, in an embodiment, a resource obtaining method isprovided. This embodiment is described by using an example in which themethod is applied to the second terminal 110 shown in FIG. 1. The methodspecifically includes following steps:

Step 33102: Receive a resource sharing message. Specifically, the secondterminal receives the resource sharing message that is generated andshared by the first terminal after the first terminal performs theresource sharing method.

Step 3904. Obtain a resource sharing message template corresponding tothe resource sharing message and resource information matching theresource sharing message template, where the resource sharing messagetemplate matches a theme activity time period.

Specifically, the resource sharing message template refers toinformation that needs to be displayed when the resource sharing messageis displayed, and may include a resource sharing message image and aresource sharing message text. The resource sharing message image is animage displayed when the resource sharing message is displayed, and theresource sharing message text is a text, such as blessing words,displayed when the resource sharing message is displayed. The resourceinformation is information about a resource that corresponds to theresource sharing message, and includes a resource share, such as ato-be-shared currency value; and the resource information may furtherinclude a resource type.

The resource is an object whose ownership can be obtained by using anetwork and includes at least one of a virtual object and a physicalobject. The virtual object includes at least one of an account value, avirtual image product, a virtual prepaid card, game equipment, andvirtual currency. The physical object may be an object that can bearbitrarily owned by the user and that has an actual form, and is forexample, an electronic product, a toy, an artifact, and a signed photo.

That the resource sharing message template has specified theme semanticsmeans that the resource sharing message template conveys a specifiedtheme idea in a form of images and/or words, so that a person may obtainthe theme idea conveyed by the resource sharing message. The resourceinformation has a mapping relationship with the resource sharing messagetemplate, so that the configuration on the to-be-shared resource may berapidly completed, and the user does not need to enter the resourceinformation character by character.

Step 3906. Display the resource sharing message template.

Specifically, the second terminal may transmit a resource sharingmessage image, and display a resource sharing message text and theresource share on the resource sharing message image.

Step 3908. Obtain an operation instruction for the displayed resourcesharing message template.

Specifically, the second terminal detects a pre-defined operation on thedisplayed resource sharing message image, and triggers a correspondingoperation instruction if detecting the pre-defined operation.

Step 3910. Generate, according to the operation instruction, a resourceobtaining request that includes a resource obtaining party identifier.

Specifically, after obtaining the operation instruction, the secondterminal may obtain a user identifier that currently logs in to a socialnetworking application, as the resource obtaining party identifier, andobtain data, such as a resource identifier, that is used for obtaining aresource and that is in the resource sharing message, so as to generatethe resource obtaining request carrying the resource obtaining partyidentifier. The resource obtaining party identifier is a uniqueidentifier of a party requesting for obtaining a resource.

Step 3912. Send the resource obtaining request to a server, so that theserver allocates a resource to the resource obtaining party identifieraccording to the resource information.

Specifically, the second terminal sends the resource obtaining requestto the server, and the server obtains the resource identifier and theresource obtaining party identifier according to the resource obtainingrequest, so as to allocate, to the resource obtaining party identifier,the resource corresponding to the resource identifier. After receivingthe resource obtaining request, the server determines whether there is aremaining share in the resource corresponding to the resourceidentifier, and if there is the remaining share, allocates, to theresource obtaining party identifier, a resource from the remainingresource, and decreases a corresponding share, and feeds back a resourceobtaining result indicating that the resource is successfully obtainedto the second terminal; or if there is no remaining share, directlyfeeds back a resource obtaining result indicating that the resource isnot successfully obtained to the second terminal.

When the server allocates a resource, if the resource is a resource thatis to be allocated as per a value, such as a virtual red packet or avalue of a prepaid card, when the server allocates a resource to theresource obtaining party identifier, the server may select a value froma preset value range randomly or according to a preset fixed value, andtransfer the value into a value account corresponding to the resourceobtaining party identifier. The value account includes a cash account ora voucher account, and the value account may be set on a bank server ora third-party payment server. If the resource is a resource that can beobtained after registration, such as a physical object, when the serverallocates the resource to the resource obtaining party identifier, theserver may record a correspondence between the resource and the resourceobtaining party identifier to represent a ownership of a correspondinguser on the resource, so that the resource is subsequently provisionedin other forms.

According to the resource obtaining method, after the resource sharingmessage is received, the resource sharing message template correspondingto the resource sharing message is displayed. The resource sharingmessage template matches the theme activity time period. Semantics thatmatch the theme activity time period and that are sent by a resourcesharing party are obtained while a resource is obtained by using theresource sharing message, so that more amount of useful information isconveyed.

In an embodiment, step 3904 includes: determining whether locally thereis a resource sharing message image corresponding to the resourcesharing message; and obtaining the local corresponding resource sharingmessage image if locally there is the resource sharing message imagecorresponding to the resource sharing message, where step 3906 includes:displaying the local corresponding resource sharing message image; ordisplaying a local default resource sharing message image and pulling,from the server, the resource sharing message image corresponding to theresource sharing message if locally there is no resource sharing messageimage corresponding to the resource sharing message, where step 3906includes: updating the displayed default resource sharing message imageto the pulled resource sharing message image.

Specifically, in this embodiment, the second terminal first determineswhether locally there is the resource sharing message imagecorresponding to the resource sharing message, and directly displays thecorresponding resource sharing message image if locally there is theresource sharing message image corresponding to the resource sharingmessage. If there is no resource sharing message image corresponding tothe resource sharing message, to ensure that the user can immediatelyidentify that the message is the resource sharing message image, theuser first displays the local default resource sharing message image andthen pulls the corresponding resource sharing message image from theserver, and performs updating after the corresponding resource sharingmessage image is pulled.

According to this embodiment, display efficiency of the resource sharingmessage image can be ensured, and the resource sharing message isdisplayed after being received, to trigger the resource obtainingrequest, so that resource obtaining efficiency is improved whileefficiency of displaying the resource sharing message image is improved.

FIG. 40 is a structural block diagram of a resource sharing apparatusaccording to an embodiment. As shown in FIG. 40, a resource sharingapparatus includes a first obtaining module 4002, a second obtainingmodule 4004, an association module 4006, an instruction generationmodule 4008, and an execution module 4010.

The first obtaining module 4002 is configured to obtain configured useridentifier.

Specifically, the user identifier may include a resource and anidentifier of a user, and may further include information content sharedby a resource sharing initiator, a time and a validity period ofresource sharing, and the like. The resource may be money, an electronicvoucher, a bonus point, game currency, a physical object coincertificate, and the like. The identifier of the user is an identifierthat uniquely identifies a user identity, and may be an instantmessaging account, a mobile phone number, a social networkingapplication account of the resource sharing initiator.

The second obtaining module 4004 is configured to obtain multimediadata.

In this embodiment, the second obtaining module 4004 is furtherconfigured to obtain, according to the resource sharing request,real-time recorded multimedia data or multimedia data selected locallyor from a server.

In this embodiment, the multimedia data may be one or two of audio dataand video data.

The audio data may be a voice recorded by the resource sharinginitiator, music selected by the resource sharing initiator, or audiodata downloaded from a network by the resource sharing initiator. Theaudio data downloaded from the network may be audio data of differentvoices such as a female voice, a male voice, a child's voice, or acartoon character's voice.

The video data may be a personalized video recorded by the resourcesharing initiator, a video made by the resource sharing initiator, or avideo downloaded from a network by the resource sharing initiator. Arole in the video may use a cartoon character, a game role, a starcharacter, or the user himself. A pre-determined time may be set inrecorded voice or video. This effectively limits the size of the voiceor the video data and can limit the size of occupied space.

The association module 4006 is configured to: obtain a resource sharingrequest, and associate the user identifier with the multimedia dataaccording to the resource sharing request.

The instruction generation module 4008 is configured to generate aresource sharing instruction according to an association relationshipbetween the user identifier and the multimedia data.

The execution module 4010 is configured to execute the resource sharinginstruction.

The resource sharing apparatus obtains the multimedia data and theconfigured user identifier, associates the user identifier with themultimedia data according to the resource sharing request, generate theresource sharing instruction according to the association relationshipbetween the user identifier and the multimedia data, and executes theresource sharing instruction, so that the multimedia data can be carriedduring resource sharing, and types of information carried duringresource sharing are expanded.

Further, the resource sharing apparatus further include a generationmodule and a sending module. The generation module is configured togenerate a resource message including the user identifier and themultimedia data; and the sending module is configured to send theresource message including the multimedia data.

In addition, the server may generate, according to the user identifierand the multimedia data, the resource message including the useridentifier and the multimedia data.

The second obtaining module 4004 is further configured to: obtain anidentifier of a user and a real-time recorded multimedia file, uploadthe identifier of the user and the multimedia file to a server, andobtain a multimedia identifier allocated by the server to the multimediafile.

In this embodiment, the server allocates the multimedia identifier tothe multimedia data, and establishes an association relationship betweenthe multimedia identifier and the identifier of the user.

When the multimedia identifier allocated by the server to the multimediadata is obtained, a resource sharing instruction is generated accordingto the association relationship between the user identifier and themultimedia identifier, and after the resource sharing instruction isexecuted, the user identifier and the multimedia identifier are uploadedto the server. The server finds the corresponding multimedia fileaccording to the multimedia identifier, and generates, according to theuser identifier and the multimedia file, the resource message includingthe user identifier and the multimedia data.

FIG. 41 is a structural block diagram of a resource sharing apparatusaccording to another embodiment. As shown in FIG. 41, in addition to afirst obtaining module 4002, a second obtaining module 4004, anassociation module 4006, an instruction generation module 4008, and anexecution module 4010, a resource sharing apparatus further includes adisplay module 4012.

The display module 4012 is configured to: display a resource messagegenerated after executing a resource sharing instruction, provide atransparent layer on a resource message body of the resource message,and display multimedia data at the transparent layer.

Further, the display module 4012 is further configured to: afterdisplaying the multimedia data at the transparent layer, display, at thetransparent layer, a multimedia control configured to control playbackof the multimedia data.

In an embodiment, the first obtaining module 4002 is further configuredto: obtain an identifier of a user that initiates a resource sharingrequest, determine whether the identifier of the user has permission toshare a personalized resource, and if the identifier of the user has thepermission, obtain the multimedia data according to the resource sharingrequest, or if the identifier of the user does not have the permission,prompt the user to enable the permission to share the personalizedresource.

FIG. 42 is a structural block diagram of a resource sharing apparatusaccording to another embodiment. As shown in FIG. 42, a resource sharingapparatus includes a receiving module 4202, a display module 4204, anoperation obtaining module 4206, a playback module 4208, and anacceptance module 4210.

The receiving module 4202 is configured to receive a resource message.

The display module 4204 is configured to display the resource message.

The operation obtaining module 4206 is configured to obtain a triggeroperation on the resource message.

The playback module 4208 is configured to play multimedia data in theresource message according to the trigger operation.

The acceptance module 4210 is configured to receive a resource in theresource message.

The resource sharing apparatus performs the trigger operation on thereceived resource message, plays the multimedia data in the resourcemessage, and receives the resource in the resource message, so that theresource message carries the multimedia data, and types of informationcarried during resource sharing are expanded.

FIG. 43 is a structural block diagram of a resource sharing apparatusaccording to another embodiment. As shown in FIG. 43, a resource sharingapparatus includes a receiving module 4202, a display module 4204, anoperation obtaining module 4206, a playback module 4208, and anacceptance module 4210, and further includes an instruction generationmodule 4212.

A transparent layer is provided on a resource message body of a resourcemessage, and multimedia data and a multimedia control that is configuredto control playback of the multimedia data are displayed at thetransparent layer.

The instruction generation module 4212 is configured to obtain a triggeroperation on the multimedia control to generate a corresponding controlinstruction.

The playback module 4208 is further configured to play the multimediadata according to the control instruction.

The receiving module 4202 is further configured to receive the resourcemessage on a chat interface.

The playback module 4208 is further configured to automatically play themultimedia data in the resource message.

A person of ordinary skill in the art may understand that all or some ofthe processes of the methods in the foregoing embodiments may beimplemented by a computer program instructing relevant hardware. Theprogram may be stored in a non-transitory computer readable storagemedium. When the program is executed, processes of the foregoing methodembodiments may be performed. The storage medium may be a magnetic disk,an optical disc, a read-only memory (ROM), or the like.

The foregoing embodiments only describe several implementation mannersof the present disclosure, and their description is specific anddetailed, but cannot therefore be understood as a limitation to thepatent scope of the present disclosure. It should be noted that a personof ordinary skill in the art may further make some variations andimprovements without departing from the concept of the presentdisclosure, and the variations and improvements belong to the protectionscope of the present disclosure. Therefore, the protection scope of thepresent disclosure should be subject to the protection scope of theappended claims.

What is claimed is:
 1. A resource sharing method performed at a mobileterminal having one or more processors and memory storing a plurality ofprograms to be executed by the one or more processors, the methodcomprising, comprising: receiving a resource sharing messageconfiguration file that is delivered in a pre-configured delivery timeperiod; obtaining a theme activity time period according to the resourcesharing message configuration file; displaying a resource sharingmessage configuration portal in the theme activity time period;detecting an operation on the resource sharing message configurationportal, and entering a resource sharing message configuration page;obtaining, according to a configuration performed on the resourcesharing message configuration page, a resource sharing message templatematching the theme activity time period and resource informationmatching the resource sharing message template; generating a resourcesharing message according to the obtained resource sharing messagetemplate and resource information, the resource sharing messagecomprising data for obtaining a resource; and sharing the resourcesharing message.
 2. The method according to claim 1, wherein thereceiving a resource sharing message configuration file that isdelivered in a pre-configured delivery time period comprises: receivinga resource sharing message configuration file that is delivered in thepre-configured delivery time period according to a correspondingdelivery policy, wherein the delivery policy comprises at least one of adelivery target user, a terminal operating system type, and a deliverytarget area.
 3. The method according to claim 1, wherein the obtaining,according to a configuration performed on the resource sharing messageconfiguration page, a resource sharing message template matching thetheme activity time period and resource information matching theresource sharing message template comprises: displaying, on the resourcesharing message configuration page according to the resource sharingmessage configuration file, a candidate resource sharing messagetemplate matching the theme activity time period and candidate resourceinformation; receiving a switch instruction, and switching the displayedresource sharing message template and/or the displayed resourceinformation, wherein a displayed resource sharing message template afterthe switching matches displayed resource information after theswitching; and receiving an acknowledgement instruction, and obtainingthe currently displayed resource sharing message template and resourceinformation according to the acknowledgement instruction.
 4. The methodaccording to claim 1, wherein the resource sharing message templatecomprises a resource sharing message image and a resource sharingmessage text, and the resource information comprises a resource share;and the method further comprises: initiating a payment requestcorresponding to the resource share; receiving a payment resultcorresponding to the payment request; and transmitting the resourcesharing message image, and displaying the resource sharing message textand the resource share on the resource sharing message image.
 5. Amobile terminal comprising one or more processors, memory coupled to theone or more processors, and a plurality of programs stored in the memorythat, when executed by the one or more processors, cause the mobileterminal to perform operations including: receiving a resource sharingmessage configuration file that is delivered in a pre-configureddelivery time period; obtaining a theme activity time period accordingto the resource sharing message configuration file; displaying aresource sharing message configuration portal in the theme activity timeperiod; detecting an operation on the resource sharing messageconfiguration portal, and entering a resource sharing messageconfiguration page; obtaining, according to a configuration performed onthe resource sharing message configuration page, a resource sharingmessage template matching the theme activity time period and resourceinformation matching the resource sharing message template; generating aresource sharing message according to the obtained resource sharingmessage template and resource information, the resource sharing messagecomprising data for obtaining a resource; and sharing the resourcesharing message.
 6. The mobile terminal according to claim 5, whereinthe receiving a resource sharing message configuration file that isdelivered in a pre-configured delivery time period comprises: receivinga resource sharing message configuration file that is delivered in thepre-configured delivery time period according to a correspondingdelivery policy, wherein the delivery policy comprises at least one of adelivery target user, a terminal operating system type, and a deliverytarget area.
 7. The mobile terminal according to claim 5, wherein theobtaining, according to a configuration performed on the resourcesharing message configuration page, a resource sharing message templatematching the theme activity time period and resource informationmatching the resource sharing message template comprises: displaying, onthe resource sharing message configuration page according to theresource sharing message configuration file, a candidate resourcesharing message template matching the theme activity time period andcandidate resource information; receiving a switch instruction, andswitching the displayed resource sharing message template and/or thedisplayed resource information, wherein a displayed resource sharingmessage template after the switching matches displayed resourceinformation after the switching; and receiving an acknowledgementinstruction, and obtaining the currently displayed resource sharingmessage template and resource information according to theacknowledgement instruction.
 8. The mobile terminal according to claim5, wherein the resource sharing message template comprises a resourcesharing message image and a resource sharing message text, and theresource information comprises a resource share; and the method furthercomprises: initiating a payment request corresponding to the resourceshare; receiving a payment result corresponding to the payment request;and transmitting the resource sharing message image, and displaying theresource sharing message text and the resource share on the resourcesharing message image.
 9. A non-transitory computer readable storagemedium storing a plurality of programs that, when executed by one ormore processors of a mobile terminal, cause the mobile terminal toperform operations including: receiving a resource sharing messageconfiguration file that is delivered in a pre-configured delivery timeperiod; obtaining a theme activity time period according to the resourcesharing message configuration file; displaying a resource sharingmessage configuration portal in the theme activity time period;detecting an operation on the resource sharing message configurationportal, and entering a resource sharing message configuration page;obtaining, according to a configuration performed on the resourcesharing message configuration page, a resource sharing message templatematching the theme activity time period and resource informationmatching the resource sharing message template; generating a resourcesharing message according to the obtained resource sharing messagetemplate and resource information, the resource sharing messagecomprising data for obtaining a resource; and sharing the resourcesharing message.
 10. The non-transitory computer readable storage mediumaccording to claim 9, wherein the receiving a resource sharing messageconfiguration file that is delivered in a pre-configured delivery timeperiod comprises: receiving a resource sharing message configurationfile that is delivered in the pre-configured delivery time periodaccording to a corresponding delivery policy, wherein the deliverypolicy comprises at least one of a delivery target user, a terminaloperating system type, and a delivery target area.
 11. Thenon-transitory computer readable storage medium according to claim 9,wherein the obtaining, according to a configuration performed on theresource sharing message configuration page, a resource sharing messagetemplate matching the theme activity time period and resourceinformation matching the resource sharing message template comprises:displaying, on the resource sharing message configuration page accordingto the resource sharing message configuration file, a candidate resourcesharing message template matching the theme activity time period andcandidate resource information; receiving a switch instruction, andswitching the displayed resource sharing message template and/or thedisplayed resource information, wherein a displayed resource sharingmessage template after the switching matches displayed resourceinformation after the switching; and receiving an acknowledgementinstruction, and obtaining the currently displayed resource sharingmessage template and resource information according to theacknowledgement instruction.
 12. The non-transitory computer readablestorage medium according to claim 9, wherein the resource sharingmessage template comprises a resource sharing message image and aresource sharing message text, and the resource information comprises aresource share; and the method further comprises: initiating a paymentrequest corresponding to the resource share; receiving a payment resultcorresponding to the payment request; and transmitting the resourcesharing message image, and displaying the resource sharing message textand the resource share on the resource sharing message image.